package com.upcontrol.uartagent.utils;


import com.upcontrol.uartagent.entity.RequireDownBodyCheckPacket;
import com.upcontrol.uartagent.entity.RequireDownBodySNPacket;
import com.upcontrol.uartagent.entity.RequireMotorSpeedPacket;
import com.upcontrol.uartagent.entity.RequireUpBodyCheckPacket;
import com.upcontrol.uartagent.entity.RequireUpBodySNPacket;
import com.upcontrol.uartagent.entity.RobotOffPacket;
import com.upcontrol.uartagent.entity.SensorRequirePacket;
import com.upcontrol.uartagent.entity.SensorSwitchPacket;
import com.upcontrol.uartagent.entity.ShakeHandPacket;

/**
 * Copyright (c) 2016, SuZhou CsjBot. All Rights Reserved. <br>
 * www.csjbot.com<br>
 * <p>
 * Created by 浦耀宗 at 2016/11/07 0007-19:19.<br>
 * Email: puyz@csjbot.com
 */
public class PacketBuilder {

    public static ShakeHandPacket createShakeHandPacket(byte cmd, byte times) {
        return new ShakeHandPacket(cmd, times);
    }

    public static SensorRequirePacket createSensorRequirePacket(byte type) {
        return new SensorRequirePacket(type);
    }

    public static SensorSwitchPacket createSensorSwitchPacket(byte cmd, byte type) {
        return new SensorSwitchPacket(cmd, type);
    }

    public static RequireDownBodySNPacket createRequireDownBodySNPacket() {
        return new RequireDownBodySNPacket();
    }

    public static RequireUpBodySNPacket createRequireUpBodySNPacket() {
        return new RequireUpBodySNPacket();
    }

    public static RequireUpBodyCheckPacket createRequireUpBodyCheckPacket() {
        return new RequireUpBodyCheckPacket();
    }

    public static RequireDownBodyCheckPacket createRequireDownBodyCheckPacket() {
        return new RequireDownBodyCheckPacket();
    }

    /**
     * 构建获取电机速度请求包
     *
     * @return 获取电机速度请求包
     */
    public static RequireMotorSpeedPacket createRequireMotorSpeedPacket() {
        return new RequireMotorSpeedPacket();
    }

    public static RobotOffPacket createRobotOffPacket() {
        return new RobotOffPacket();
    }
}
